﻿@model AexoManager.Models.DespieceViewModel
@{
    ViewBag.Title = "Producto Detalle";
    Layout = "~/Views/Shared/_Template.cshtml";
}

@section ClientScripts {
    <script type='text/javascript'>
        $(function () {
            $("#btnSubmit").click(function () {
                $("#formPrincipal").submit();
            });

        });
    </script>
}
<div id="page-content">
    <div id='wrap'>
        <div id="page-heading">
            <ol class="breadcrumb">
                <li class='active'><a href="index.php">Producto</a></li>
                <li class='active'><a href="index.php">Detalle</a></li>
            </ol>

            <h1>Producto</h1>
        </div>
        <div class="container">
            <div class="panel panel-midnightblue">
                <div class="panel-heading">
                    <h4>Producto</h4>
                </div>
                <div class="panel-body collapse in">
                    @using (Html.BeginForm("GuardarProducto", "Despiece", FormMethod.Post, new { @id = "formPrincipal", @class = "form-horizontal row-border" }))
                    {
                        <div class="form-group">
                            <label class="col-sm-3 control-label">Codigo</label>
                            <div class="col-sm-6">
                                @Html.TextBoxFor(model => model.Codigo, new { @class = "form-control" })
                                @Html.HiddenFor(model => model.IdProducto)
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">Descripcion</label>
                            <div class="col-sm-6">
                                @Html.TextBoxFor(model => model.Descripcion, new { @class = "form-control" })
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">Parte Final</label>
                            <div class="col-sm-6">
                                @Html.DropDownListFor(model => model.IdParte, new SelectList(ViewBag.PartesFinales, "IdParte", "Descripcion"), "Partes", new { @class = "form-control" })
                            </div>
                        </div>
                    }
                    <div class="panel-footer">
                        <div class="row">
                            <div class="col-sm-6 col-sm-offset-3">
                                <div class="btn-toolbar">
                                    <button id="btnSubmit" class="btn-primary btn">Submit</button>
                                    <button class="btn-default btn">Cancel</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div> <!--wrap -->
</div> <!-- page-content -->